package com.project.config;

import com.project.util.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionController {


    @ExceptionHandler(Exception.class)
    public R handler( Exception e ){
        e.printStackTrace();
        return R.fail(e.getMessage()).setData(e);
    }

}
